<?php
	class CTRLTest extends XController 
	{
		public function test0()
		{
			$json = <<< JSON
{
	"station": "station0",
	"token": "abcdefg",
	"entry": [
		{
				"device": "hpic",	
				"time": "2013-01-02 19:05:00",
				"1020304050": "T1 VALUE",
				"1020304051": "T2 VALUE"
		},
		{
				"device": "weather",	
				"time": "2013-01-02 19:05:00",
				"1020304050": "T1 VALUE",
				"1020304051": "T2 VALUE"
		}
	]
}
JSON;

			$json = json_decode($json, true);

			DeviceModel::saveData($json);

		}

		public function test()
		{
			// CommandModel::add('station0', 360, '{"file":"/dev/null"}');
			// CommandModel::add('station0', 361, '{"file":"/dev/null"}');

//			var_dump(CommandModel::query('station0'));

//			CommandModel::reply(6, '{"len" : 1024}');
		}
	}
?>